﻿using System;
using System.Text;
using System.IO;
using System.Web.Script.Serialization;

namespace Helpers
{
    public class JsonHelpers
    {
        public static string Serialize<T>(T obj)
        {
            var jss = new JavaScriptSerializer();
            return jss.Serialize(obj);
        }

        public static T Deserialize<T>(string json)
        {
            var jss = new JavaScriptSerializer();
            return jss.Deserialize<T>(json);
        }
    }
}
